#include <iostream>
#include <cstring>
#include <algorithm>

#define x first
#define y second

using namespace std;

typedef pair<int, int> PII;
const int N = 1010;
PII p[N];
int dx[] = {-1, -1, -1, 0, 1, 1, 1, 0}, dy[] = {-1, 0, 1, 1, 1, 0, -1, -1};
int ans[5];

int main()
{
    
    int n;
    cin >> n;
    memset(ans, 0, sizeof ans);
    for (int i = 1 ; i <= n ; i ++)
        cin >> p[i].x >> p[i].y;
    
    for (int i = 1 ; i <= n ; i ++)
    {
        int s[8] = {0};
        for (int j = 1 ; j <= n ; j ++)
        {
            for (int k = 0 ; k < 8 ; k ++)
                if (p[i].x + dx[k] == p[j].x && p[i].y + dy[k] == p[j].y)
                    s[k] ++;
        }
        if (s[1] && s[3] && s[5] && s[7])
            ans[s[0] + s[2] + s[4] + s[6]] ++;
    }
    
    for (auto x : ans)
        cout << x << endl;
        
    return 0;
}
